import redis
from flask import current_app


class RedisTool:
    def __init__(self):
        host = current_app.config.get("HOST")
        port = current_app.config.get("PORT")
        password = current_app.config.get("PASSWORD")
        self.rds = redis.Redis(host=host,port=port,password=password)